import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '任务名称',
    align: "center", resizable: true,
    dataIndex: 'name'
  },
  {
    title: '项目',
    align: "center", resizable: true,
    dataIndex: 'projectId_dictText'
  },
  {
    title: '任务日期',
    align: "center", resizable: true,
    dataIndex: 'taskDate',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
  },
  {
    title: '状态',
    align: "center", resizable: true,
    dataIndex: 'processingStatus'
  },
  {
    title: '任务类型',
    align: "center", resizable: true,
    dataIndex: 'type'
  },
  {
    title: '分配给谁',
    align: "center", resizable: true,
    dataIndex: 'assignedTo_dictText'
  },
  {
    title: '联系人',
    align: "center", resizable: true,
    dataIndex: 'contactPerson'
  },
  {
    title: '联系电话',
    align: "center", resizable: true,
    dataIndex: 'phone'
  },
  {
    title: '处理日期',
    align: "center", resizable: true,
    dataIndex: 'processingDate',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
  },
];

// 高级查询数据
export const superQuerySchema = {
  name: {title: '任务名称',order: 0,view: 'text', type: 'string',},
  projectId: {title: '项目',order: 2,view: 'list', type: 'string',dictTable: "c_project_application", dictCode: 'id', dictText: 'project_name',},
  taskDate: {title: '任务日期',order: 4,view: 'date', type: 'string',},
  type: {title: '任务类型',order: 6,view: 'text', type: 'string',},
  contactPerson: {title: '联系人',order: 8,view: 'text', type: 'string',},
  phone: {title: '联系电话',order: 9,view: 'text', type: 'string',},
  processingDate: {title: '处理日期',order: 12,view: 'date', type: 'string',},
};
